package defpackage; import cn.wps.moffice.writer.core.TextDocument; import defpackage.msj; import defpackage.msm; import java.io.IOException; import java.util.ArrayList; /* renamed from: ofd reason: default package */ public final class ofd { static int quD = 1; private static Integer a(ode ode, msm.d dVar) { if (dVar == null) { return null; } Integer num = ode.qta.get(dVar); if (num != null) { return num; } int i = quD; quD = i + 1; Integer valueOf = Integer.valueOf(i); ode.qta.put(dVar, valueOf); return valueOf; } public static void a(ode ode, odf odf) throws IOException { TextDocument textDocument = ode.pxJ; ew.assertNotNull("textDoc should not be null!", textDocument); mdl dDT = textDocument.dDT(); ew.assertNotNull("mainDoc should not be null!", dDT); msm dEp = dDT.dEp(); if (dEp != null) { ew.assertNotNull("commentRef should not be null!", dEp); ew.assertNotNull("w should not be null!", odf); odf.i("w15:commentsEx", "xmlns:w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main", "xmlns:wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing", "xmlns:r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships", "xmlns:v", "urn:schemas-microsoft-com:vml", "xmlns:w10", "urn:schemas-microsoft-com:office:word", "xmlns:o", "urn:schemas-microsoft-com:office:office", "xmlns:wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing", "xmlns:w14", "http://schemas.microsoft.com/office/word/2010/wordml", "xmlns:w15", "http://schemas.microsoft.com/office/word/2012/wordml", "xmlns:mc", "http://schemas.openxmlformats.org/markup-compatibility/2006", "xmlns:m", "http://schemas.openxmlformats.org/officeDocument/2006/math", "xmlns:wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape", "xmlns:wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup", "xmlns:wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk", "xmlns:wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas", "xmlns:wne", "http://schemas.microsoft.com/office/word/2006/wordml", "mc:Ignorable", "w15 w14 wp14"); msj.g dOv = dEp.dOv(); while (dOv.hasNext()) { msm.d dVar = (msm.d) dOv.dOx(); ew.assertNotNull("refNode should not be null!", dVar); ew.assertNotNull("w should not be null!", odf); Integer a = a(ode, dVar); Integer a2 = a(ode, dVar.pjE); if (a != null) { ArrayList<String> arrayList = new ArrayList<>(); arrayList.add("w15:paraId"); arrayList.add(String.valueOf(a)); if (a2 != null) { arrayList.add("w15:paraIdParent"); arrayList.add(String.valueOf(a2)); } odf.e("w15:commentEx", arrayList); } } odf.endElement("w15:commentsEx"); quD = 1; } } }